home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / include / amiga20 / clib / exec_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-11  |  7.8 KB  |  164 lines

  1. #ifndef  CLIB_EXEC_PROTOS_H
  2. #define  CLIB_EXEC_PROTOS_H
  3. /*
  4. **    $Filename: clib/exec_protos.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 30.156 $
  7. **    $Date: 1995/01/11 05:18:08 $
  8. **
  9. **    C prototypes. For use with 32 bit integers only.
  10. **
  11. **    (C) Copyright 1990 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14. #ifndef  EXEC_TYPES_H
  15. #include <exec/types.h>
  16. #endif
  17. /*------ misc ---------------------------------------------------------*/
  18. ULONG Supervisor( unsigned long (*userFunction)() );
  19. /*------ special patchable hooks to internal exec activity ------------*/
  20. /*------ module creation ----------------------------------------------*/
  21. void InitCode( unsigned long startClass, unsigned long version );
  22. void InitStruct( APTR initTable, APTR memory, unsigned long size );
  23. struct Library *MakeLibrary( APTR funcInit, APTR structInit,
  24.     unsigned long (*libInit)(), unsigned long dataSize,
  25.     unsigned long segList );
  26. void MakeFunctions( APTR target, APTR functionArray,
  27.     unsigned long funcDispBase );
  28. struct Resident *FindResident( UBYTE *name );
  29. void InitResident( struct Resident *resident, unsigned long segList );
  30. /*------ diagnostics --------------------------------------------------*/
  31. void Alert( unsigned long alertNum );
  32. void Debug( unsigned long flags );
  33. /*------ interrupts ---------------------------------------------------*/
  34. void Disable( void );
  35. void Enable( void );
  36. void Forbid( void );
  37. void Permit( void );
  38. ULONG SetSR( unsigned long newSR, unsigned long mask );
  39. APTR SuperState( void );
  40. void UserState( APTR sysStack );
  41. struct Interrupt *SetIntVector( long intNumber, struct Interrupt *interrupt );
  42. void AddIntServer( long intNumber, struct Interrupt *interrupt );
  43. void RemIntServer( long intNumber, struct Interrupt *interrupt );
  44. void Cause( struct Interrupt *interrupt );
  45. /*------ memory allocation --------------------------------------------*/
  46. APTR Allocate( struct MemHeader *freeList, unsigned long byteSize );
  47. void Deallocate( struct MemHeader *freeList, APTR memoryBlock,
  48.     unsigned long byteSize );
  49. APTR AllocMem( unsigned long byteSize, unsigned long requirements );
  50. APTR AllocAbs( unsigned long byteSize, APTR location );
  51. void FreeMem( APTR memoryBlock, unsigned long byteSize );
  52. ULONG AvailMem( unsigned long requirements );
  53. struct MemList *AllocEntry( struct MemList *entry );
  54. void FreeEntry( struct MemList *entry );
  55. /*------ lists --------------------------------------------------------*/
  56. void Insert( struct List *list, struct Node *node, struct Node *pred );
  57. void AddHead( struct List *list, struct Node *node );
  58. void AddTail( struct List *list, struct Node *node );
  59. void Remove( struct Node *node );
  60. struct Node *RemHead( struct List *list );
  61. struct Node *RemTail( struct List *list );
  62. void Enqueue( struct List *list, struct Node *node );
  63. struct Node *FindName( struct List *list, UBYTE *name );
  64. /*------ tasks --------------------------------------------------------*/
  65. APTR AddTask( struct Task *task, APTR initPC, APTR finalPC );
  66. void RemTask( struct Task *task );
  67. struct Task *FindTask( UBYTE *name );
  68. BYTE SetTaskPri( struct Task *task, long priority );
  69. ULONG SetSignal( unsigned long newSignals, unsigned long signalSet );
  70. ULONG SetExcept( unsigned long newSignals, unsigned long signalSet );
  71. ULONG Wait( unsigned long signalSet );
  72. void Signal( struct Task *task, unsigned long signalSet );
  73. BYTE AllocSignal( long signalNum );
  74. void FreeSignal( long signalNum );
  75. LONG AllocTrap( long trapNum );
  76. void FreeTrap( long trapNum );
  77. /*------ messages -----------------------------------------------------*/
  78. void AddPort( struct MsgPort *port );
  79. void RemPort( struct MsgPort *port );
  80. void PutMsg( struct MsgPort *port, struct Message *message );
  81. struct Message *GetMsg( struct MsgPort *port );
  82. void ReplyMsg( struct Message *message );
  83. struct Message *WaitPort( struct MsgPort *port );
  84. struct MsgPort *FindPort( UBYTE *name );
  85. /*------ libraries ----------------------------------------------------*/
  86. void AddLibrary( struct Library *library );
  87. void RemLibrary( struct Library *library );
  88. struct Library *OldOpenLibrary( UBYTE *libName );
  89. void CloseLibrary( struct Library *library );
  90. APTR SetFunction( struct Library *library, long funcOffset,
  91.     unsigned long (*newFunction)() );
  92. void SumLibrary( struct Library *library );
  93. /*------ devices ------------------------------------------------------*/
  94. void AddDevice( struct Device *device );
  95. void RemDevice( struct Device *device );
  96. BYTE OpenDevice( UBYTE *devName, unsigned long unit,
  97.     struct IORequest *ioRequest, unsigned long flags );
  98. void CloseDevice( struct IORequest *ioRequest );
  99. BYTE DoIO( struct IORequest *ioRequest );
  100. void SendIO( struct IORequest *ioRequest );
  101. BOOL CheckIO( struct IORequest *ioRequest );
  102. BYTE WaitIO( struct IORequest *ioRequest );
  103. void AbortIO( struct IORequest *ioRequest );
  104. /*------ resources ----------------------------------------------------*/
  105. void AddResource( APTR resource );
  106. void RemResource( APTR resource );
  107. APTR OpenResource( UBYTE *resName );
  108. /*------ private diagnostic support -----------------------------------*/
  109. /*------ misc ---------------------------------------------------------*/
  110. void RawDoFmt( UBYTE *formatString, APTR dataStream, void (*putChProc)(),
  111.     APTR putChData );
  112. ULONG GetCC( void );
  113. ULONG TypeOfMem( APTR address );
  114. ULONG Procure( struct Semaphore *semaport, struct Message *bidMsg );
  115. void Vacate( struct Semaphore *semaport );
  116. struct Library *OpenLibrary( UBYTE *libName, unsigned long version );
  117. /*--- functions in V33 or higher (distributed as Release 1.2) ---*/
  118. /*------ signal semaphores (note funny registers)----------------------*/
  119. void InitSemaphore( struct SignalSemaphore *sigSem );
  120. void ObtainSemaphore( struct SignalSemaphore *sigSem );
  121. void ReleaseSemaphore( struct SignalSemaphore *sigSem );
  122. ULONG AttemptSemaphore( struct SignalSemaphore *sigSem );
  123. void ObtainSemaphoreList( struct List *sigSem );
  124. void ReleaseSemaphoreList( struct List *sigSem );
  125. struct SignalSemaphore *FindSemaphore( UBYTE *sigSem );
  126. void AddSemaphore( struct SignalSemaphore *sigSem );
  127. void RemSemaphore( struct SignalSemaphore *sigSem );
  128. /*------ kickmem support ----------------------------------------------*/
  129. ULONG SumKickData( void );
  130. /*------ more memory support ------------------------------------------*/
  131. ULONG AddMemList( unsigned long size, unsigned long attributes,
  132.     unsigned long pri, APTR base, UBYTE *name );
  133. void CopyMem( APTR source, APTR dest, unsigned long size );
  134. void CopyMemQuick( APTR source, APTR dest, unsigned long size );
  135. /*------ cache --------------------------------------------------------*/
  136. /*--- functions in V36 or higher (distributed as Release 2.0) ---*/
  137. void CacheClearU( void );
  138. void CacheClearE( APTR address, unsigned long length, unsigned long caches );
  139. ULONG CacheControl( unsigned long cacheBits, unsigned long cacheMask );
  140. /*------ misc ---------------------------------------------------------*/
  141. APTR CreateIORequest( struct MsgPort *port, unsigned long size );
  142. void DeleteIORequest( APTR iorequest );
  143. struct MsgPort *CreateMsgPort( void );
  144. void DeleteMsgPort( struct MsgPort *port );
  145. void ObtainSemaphoreShared( struct SignalSemaphore *sigSem );
  146. /*------ even more memory support -------------------------------------*/
  147. APTR AllocVec( unsigned long byteSize, unsigned long requirements );
  148. void FreeVec( APTR memoryBlock );
  149. APTR CreatePrivatePool( unsigned long requirements, unsigned long puddleSize,
  150.     unsigned long puddleThresh );
  151. void DeletePrivatePool( APTR poolHeader );
  152. APTR AllocPooled( unsigned long memSize, APTR poolHeader );
  153. void FreePooled( APTR memory, APTR poolHeader );
  154. /*------ misc ---------------------------------------------------------*/
  155. void ColdReboot( void );
  156. void StackSwap( APTR newSize, APTR newSP, APTR newStack );
  157. /*------ task trees ---------------------------------------------------*/
  158. void ChildFree( APTR tid );
  159. void ChildOrphan( APTR tid );
  160. void ChildStatus( APTR tid );
  161. void ChildWait( APTR tid );
  162. /*------ future expansion ---------------------------------------------*/
  163. #endif     /* CLIB_EXEC_PROTOS_H */
  164.